import Vue from 'vue'
import VueRouter from 'vue-router'
// import { component } from 'vue/types/umd'
const Login = () => import('@/views/Login')
const Home = () => import('@/views/Home')
const Welcom = () => import('@/views/Welcom')
const Business = () => import('@/views/Business')
const New = () => import('@/views/New')
const City = () => import('@/views/City')
const System = () => import('@/views/System')
const Dailysalary = () => import('@/views/Dailysalary')


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name:'login',
    component: Login
  },
  {
    path:'/home',
    component: Home,
    redirect: '/welcom',
    children:[
      {path:'/welcom',
        component: Welcom},
      {
        path: '/new',
        component: New
      },

      {
        path: '/business',
        component: Business
      },
      {
        path: '/city',
        component: City
      },
      {
        path: '/system',
        component: System
      },
      {
        path: '/dailysalary',
        component: Dailysalary
      }
    
    ]
  }
 
]

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router
